<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
	<title>tupian</title>
</head>
<style type="text/css">
	#imgViewer{
		/*display: none;*/
		width: 100%;
	    height: 100%;
	    position: fixed;
	    top: 0;left: 0;right: 0;bottom: 0;
	    z-index: 1000;
	    background-color: rgba(0,0,0,0.85);
	    
	    background-attachment:fixed;
	}
	#imgBox{
		overflow: hidden;
		width: 100%;
	    height: 100%;
	}
	.full-image{
		list-style: none;float: left;
		display: inline-block;
	    position: relative;
	    width: 100%;
	    height: 100%;
	    text-align: center;
    	/*position: relative;*/
	}
	.full-image img{
		/*display: inline-block;*/
		width: 100%;
	    position: absolute;
	    top: 0;left: 0;right: 0;bottom: 0;
	    z-index: 1001;
	    margin: auto;
	}

	#btn{
		width: 300px;
		height: 100px;
		margin:50px auto;
		line-height:100px;
		z-index: 1002;
		position: absolute;
	    top: 0;left: 0;right: 0;bottom: 0;
	}
	#btn a{
		margin-left: 30px;
		padding: 30px 30px;
		border: 1px solid #666;
		border-radius:10px;
		text-decoration: none;
		font-size: 20px;
		/*z-index: 1003;*/
	}
</style>
<body>

<div id="btn">
	<a href="javascript:goLeft();">向左</a>
	<a href="javascript:goRight();">向右</a>
</div>

<div id="imgViewer">
	<div id="imgBox">
		<div class="full-image" id="img-0" style="">
			<img src="file:///D:/software/phpstudy/PHPTutorial/WWW/jsCode/project/imgViewer/img/tibet-1.jpg">
		</div>

		<div class="full-image" id="img-1">
			<img src="file:///D:/software/phpstudy/PHPTutorial/WWW/jsCode/project/imgViewer/img/tibet-2.jpg">
		</div>

		<div class="full-image" id="img-2">
			<img src="file:///D:/software/phpstudy/PHPTutorial/WWW/jsCode/project/imgViewer/img/tibet-3.jpg">
		</div>

		<div class="full-image" id="img-3">
			<img src="file:///D:/software/phpstudy/PHPTutorial/WWW/jsCode/project/imgViewer/img/tibet-4.jpg">
		</div>

		<div class="full-image" id="img-4">
			<img src="file:///D:/software/phpstudy/PHPTutorial/WWW/jsCode/project/imgViewer/img/tibet-5.jpg">
		</div>
	</div>
</div>


<script type="text/javascript">

var w =  window.screen.width;


function goLeft() {
	console.log(w);
}
function goRight() {
	console.log(w);
}

console.log(w);
</script>

</body>
</html>